package xin.lhuo.we.server.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xin.lhuo.we.server.dao.TodayMapper;
import xin.lhuo.we.server.entity.Today;
import xin.lhuo.we.server.service.ITodayService;

import java.util.List;

/**
 * @author Lhuo
 * @date 2019/6/18 0:45
 */
@Service
public class TodayServiceImpl implements ITodayService {
    @Autowired
    private TodayMapper todayMapper;

    @Override
    public List<Today> getTodayList(Integer userId) {
        return todayMapper.getTodayForUserId(userId);
    }

    @Override
    public void createToday(Today today) {
        todayMapper.saveToday(today);
    }
}
